local wdtx__qingGangSkill = fk.CreateSkill {
  name = "#wdtx__qinggang_sword_skill",
  tags = { Skill.Compulsory, },
  attached_equip = "wdtx__qinggang_sword",
}

wdtx__qingGangSkill:addEffect(fk.TargetSpecified, {
  name = "#wdtx__qinggang_sword_skill",
  priority = 12,
  frequency = Skill.Compulsory,
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(wdtx__qingGangSkill.name) and
      data.card and data.card.trueName == "slash"
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local to = data.to
    local use_event = room.logic:getCurrentEvent():findParent(GameEvent.UseCard, true)
    if use_event == nil then return end
    local equipid = player:getEquipment(Card.SubtypeWeapon)
    if not equipid then return end
    local ecard = Fk:getCardById(equipid)
    if ecard and ecard:getMark("@@up_fengren") ~= 0 and not to.dead then
      if #to.player_cards[Player.Equip] > 0 then
        local eid = room:askToChooseCard(player,{
          target = to,
          flag = "e",
          skill_name = wdtx__qingGangSkill.name,
        })
        if eid then
          room:throwCard(eid, wdtx__qingGangSkill.name, to, player)
        end
      end
      data:isDisresponsive(data.to)
      -- data.additionalDamage = (data.additionalDamage or 0) + 1
    end
    room:addPlayerMark(to, MarkEnum.MarkArmorNullified)
    use_event:addCleaner(function()
      room:removePlayerMark(to, MarkEnum.MarkArmorNullified)
    end)
  end,
})


return wdtx__qingGangSkill